const initState = {
  token: "",
  userInfo: {},
};
export default {
  state: {
    ...initState,
  },
  mutations: {
    set_token(state, token) {
      token ? (state.token = token) : (state.token = "");
    },

    setUserInfo(state, userInfo) {
      userInfo.id ? (state.userInfo = userInfo) : (state.userInfo = {});
    },
    setEmpty(state) {
      Object.assign(state, ...initState);
    },
  },
  actions: {},
};
